
package edu.wpi.first.wpilibj.templates.subsystems;

import edu.wpi.first.wpilibj.command.Subsystem;
import edu.wpi.first.wpilibj.CANJaguar;
import edu.wpi.first.wpilibj.can.CANTimeoutException;
import edu.wpi.first.wpilibj.templates.HardwareMap;

/**
 *
 */
public class Shooter extends Subsystem {
    // Put methods for controlling this subsystem
    // here. Call these from Commands.

    CANJaguar LeftMotor;
    CANJaguar RightMotor;
    
    private static final int LEFT_POLARITY = 1;
    private static final int RIGHT_POLARITY = -1;
    
    public Shooter(){
        super("Shooter");
        try {
            LeftMotor = new CANJaguar(HardwareMap.LEFT_SHOOTER_JAGUAR);
            RightMotor = new CANJaguar(HardwareMap.RIGHT_SHOOTER_JAGUAR);
        }
        catch (CANTimeoutException e){
           e.printStackTrace();
        }
    }
    public void initDefaultCommand() {
        // Set the default command for a subsystem here.
        //setDefaultCommand(new MySpecialCommand());
    }
    public void Move(double Speed){
        try {
            LeftMotor.setX(LEFT_POLARITY*Speed);
            RightMotor.setX(RIGHT_POLARITY*Speed);
        }
        catch (CANTimeoutException e){
            e.printStackTrace();
        }
    }
}

